package cn.fighter3.controller;

import cn.fighter3.entity.node.Cnbook;
import cn.fighter3.result.Result;
import cn.fighter3.service.impl.CnbookService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/cnbook")
public class CnbookController {
    @Autowired
    CnbookService cnbookService;

    @GetMapping("/findAll")
    public Result findAll(){
        //return cnbookService.findAll();
        return (new Result(200,"hello",cnbookService.findAll()));
    }
}
